from flask import Flask

from pkg import setting, hook
import models
import routes



app = Flask(__name__)



setting.Setup(app)
models.Setup(app)
hook.setup(app)

routes.initRoute(app)



def main():
    port = app.config.get("PORT", 8080)
    app.run(port=port)

if __name__ == "__main__":
    main()